package com.example.dao;

import com.example.pojo.User;
import org.apache.ibatis.annotations.*;

@Mapper
public interface UserMapper {
    @Insert("insert into t_user(name,image,phone,email,createTime) " +
            "values(#{user.name},#{user.image},#{user.phone},#{user.email},#{user.createTime})")
    public int insertUser(@Param("user") User user);

    @Update("update t_user " +
            "set image = #{user.image} where id = #{user.id}")
    public int updateImage(@Param("user") User user);
    @Select("select * " +
            "from t_user where id = #{id} limit 1")
    public User selectById(@Param("id") int id);
}